<?php

class users {

    public $id;
    public $username;
    public $password;
    public $firstname;
    public $lastname;
    public $sex;
    public $email;
    public $birthday;
    public $sitename;
    public $siteurl;
    public $role;
    public $location;

    function users($_id, $_username, $_password, $_firstname,$_lastname,$_sex, $_email,$_birthday, $_sitename, $_siteurl, $_role, $_location) {
        $this->id = $_id;
        $this->username = $_username;
        $this->password = $_password;
        $this->firstname = $_firstname;
        $this->lastname = $_lastname;
        $this->sex = $_sex;
        $this->email = $_email;
        $this->birthday = $_birthday;
        $this->sitename = $_sitename;
        $this->siteurl = $_siteurl;
        $this->role = $_role;
        $this->location = $_location;
    }

}
	function validateUser($user){
		//if it's NOT valid
		if(strlen($user) < 5)
			return false;
		//if it's valid
		else
			return true;
	}
	function validatePass($pass){
		//if it's NOT valid
		if(strlen($pass) < 7)
			return false;
		//if it's valid
		else
			return true;
	}
	function validateFirstname($fname){
		//if it's NOT valid
		if(strlen($fname) == 0)
			return false;
		//if it's valid
		else
			return true;
	}
	function validateLastname($lname){
		//if it's NOT valid
		if(strlen($lname) == 0)
			return false;
		//if it's valid
		else
			return true;
	}
?>